<?xml version="1.0" encoding="windows-1250"?>
<gxsl:stylesheet xmlns:gxsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/TransformAlias" xml:space="default">
  <gxsl:namespace-alias stylesheet-prefix="xsl" result-prefix="gxsl"/>
  <gxsl:output method="xml" encoding="windows-1250" indent="yes"/>

  <gxsl:param name="cvincludepage"/>
  <gxsl:param name="lang">cs</gxsl:param>
  
  <gxsl:template match="/">
    <xsl:stylesheet version="1.0">
      <xsl:output method="html" indent="no" encoding="windows-1250"/>
      <gxsl:apply-templates select="$cvincludepage/ancestor::CView"/>
    </xsl:stylesheet>
  </gxsl:template>

  <gxsl:template match="CView">
    <gxsl:variable name="dict" select="document('dictionary.xml')/Translation"/>

    <xsl:template match="coverer_{CVInclude/@concept}|coverer_{CVInclude/@concept}_norec">      
      <gxsl:choose>
      <gxsl:when test="CVInclude/@create='1'">

        <form action="?dp=createxml" method="post">
          <textarea class="text" cols="110" rows="18" name="indoc"></textarea><br/>

          <gxsl:variable name="title"><xsl:value-of select="CVInclude/CVITitles/CVITitle[@id_cttype='createbutton']/Title"/></gxsl:variable>
          <gxsl:choose>
            <gxsl:when test="not($title) or $title=''">
              <input type="submit" class="input_button"><gxsl:attribute name="value"><gxsl:value-of select="$dict/Text[@tid='crt']/Value[@lang=$lang]"/></gxsl:attribute></input>
            </gxsl:when>
            <gxsl:otherwise>
              <input type="submit" class="input_button" value="{$title}"/>
            </gxsl:otherwise>
          </gxsl:choose>

        </form>

      </gxsl:when>
      </gxsl:choose>      
    </xsl:template>

    <xsl:template name="title"><gxsl:value-of select="ancestor::CView/CVTitles/CVTitle/Title"/></xsl:template>  

  </gxsl:template>
</gxsl:stylesheet>